package com.henghai.zhenxuan.listener;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class InstallReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(Intent.ACTION_PACKAGE_ADDED)) {
            String packageName = intent.getDataString(); // 获取安装的应用包名
//            int uid = intent.getIntExtra(Intent.EXTRA_UID, -1); // 获取应用的用户ID
//            if (packageName != null && packageName.equals("package:com.baitai.integral")) {//监听到汇品优淘安装，隐藏自己
////                if (AppConfig.INSTANCE.getMConfigs().login().get().getIsPrivate() != null
////                        && AppConfig.INSTANCE.getMConfigs().login().get().getIsPrivate().equals("1")) { //1 隐藏智诚优选、2隐藏惠品优淘
//                    Utils.hideApp(context);
////                }
//            }
        }

    }
}
